package com.nb.protocol.queue;


import com.nb.protocol.protocol.MessageHolder;

import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingQueue;

public class TaskQueue {
    private volatile static BlockingQueue<MessageHolder> queue;

    public static BlockingQueue<MessageHolder> getQueue() {
        if (queue == null) {
            synchronized (TaskQueue.class) {
                if (queue == null) {
                    queue = new ArrayBlockingQueue<>(9192);
                }
            }
        }
        return queue;
    }
}
